#include "RPGChatServer.h"
#include "RPGChatServerThread.h"
#include <iostream>

RPGChatServer::RPGChatServer(QObject* parent):
	QTcpServer(parent)
{
}

void RPGChatServer::incomingConnection(int socketDescriptor)
{
	RPGChatServerThread* thread = new RPGChatServerThread(socketDescriptor, this);

	// connect events
	connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));

	thread->start();
}
